.class Lcom/xiaomi/notes/NoteListActivity$6;
.super Ljava/lang/Object;
.source "NoteListActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/xiaomi/notes/NoteListActivity;->initListener()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/xiaomi/notes/NoteListActivity;


# direct methods
.method constructor <init>(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 554
    iput-object p1, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 10
    .parameter "v"

    .prologue
    .line 558
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$000(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v6

    packed-switch v6, :pswitch_data_0

    .line 608
    :goto_0
    :pswitch_0
    return-void

    .line 560
    :pswitch_1
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v6

    invoke-virtual {v6}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 561
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$1000(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v6

    packed-switch v6, :pswitch_data_1

    :pswitch_2
    goto :goto_0

    .line 563
    :pswitch_3
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderNameList()[Ljava/lang/String;

    move-result-object v4

    .line 564
    .local v4, items:[Ljava/lang/String;
    new-instance v1, Landroid/app/AlertDialog$Builder;

    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v1, v6}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 565
    .local v1, dialog:Landroid/app/AlertDialog$Builder;
    new-instance v6, Lcom/xiaomi/notes/NoteListActivity$6$1;

    invoke-direct {v6, p0, v0}, Lcom/xiaomi/notes/NoteListActivity$6$1;-><init>(Lcom/xiaomi/notes/NoteListActivity$6;Lcom/xiaomi/notes/AdapterNoteItem;)V

    invoke-virtual {v1, v4, v6}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 581
    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    goto :goto_0

    .line 584
    .end local v1           #dialog:Landroid/app/AlertDialog$Builder;
    .end local v4           #items:[Ljava/lang/String;
    :pswitch_4
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getVectorEditFlag()Ljava/util/Set;

    move-result-object v5

    .line 585
    .local v5, vct:Ljava/util/Set;,"Ljava/util/Set<Ljava/lang/Integer;>;"
    invoke-interface {v5}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v3

    .line 586
    .local v3, it:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/Integer;>;"
    :cond_0
    :goto_1
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_1

    .line 587
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/Integer;

    invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I

    move-result v2

    .line 588
    .local v2, id:I
    invoke-static {v2}, Lcom/xiaomi/notes/NoteListActivity;->isFolder(I)Z

    move-result v6

    if-nez v6, :cond_0

    .line 589
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v6

    int-to-long v7, v2

    const/4 v9, -0x1

    invoke-virtual {v6, v7, v8, v9}, Lcom/xiaomi/notes/DBOperate;->updateNote(JI)V

    goto :goto_1

    .line 592
    .end local v2           #id:I
    :cond_1
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v7}, Lcom/xiaomi/notes/NoteListActivity;->access$1000(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v7

    invoke-virtual {v6, v7}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 598
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    .end local v3           #it:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/Integer;>;"
    .end local v5           #vct:Ljava/util/Set;,"Ljava/util/Set<Ljava/lang/Integer;>;"
    :pswitch_5
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v6

    invoke-virtual {v6}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 599
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->hasNoEmptyFolder()Z

    move-result v6

    if-eqz v6, :cond_2

    .line 600
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$1100(Lcom/xiaomi/notes/NoteListActivity;)V

    goto :goto_0

    .line 602
    :cond_2
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$1200(Lcom/xiaomi/notes/NoteListActivity;)V

    .line 603
    iget-object v6, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity$6;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v7}, Lcom/xiaomi/notes/NoteListActivity;->access$1000(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v7

    invoke-virtual {v6, v7}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto/16 :goto_0

    .line 558
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_5
        :pswitch_0
        :pswitch_0
        :pswitch_1
    .end packed-switch

    .line 561
    :pswitch_data_1
    .packed-switch 0x0
        :pswitch_3
        :pswitch_2
        :pswitch_2
        :pswitch_4
    .end packed-switch
.end method
